<!-- 顶部导航 -->
<div class="navbar navbar-fixed-top main-nav" role="navigation">
    <div class="container">
        <div class="navbar-header">
            <button #button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".navbar-responsive-collapse" (click)="toggle(button)">
                <span class="sr-only">Toggle Navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a routerLink="posts" class="navbar-brand-my">
                <img class="logo-img" alt="Brand" src="/assets/imgs/angular2-small.png">
            </a>
        </div>
        <div class="collapse navbar-collapse navbar-responsive-collapse" aria-expanded="false">
            <ul class="nav navbar-nav">
                <li routerLinkActive="active" class="dropdown">
                    <a routerLink="posts">动态</a>
                </li>
                <li class="dropdown">
                    <a href="http://www.angular.io/" data-toggle="dropdown" class="dropdown-toggle" target="_blank">官方文档</a>
                </li>
                <li class="dropdown">
                    <a href="http://git.oschina.net/mumu-osc/NiceFish" data-toggle="dropdown" class="dropdown-toggle" target="_blank">NiceFish</a>
                </li>
            </ul>
            <ul *ngIf="!currentUser?.username" class="nav navbar-nav navbar-right">
                <li routerLinkActive="active" [routerLinkActiveOptions]="{exact: true}">
                    <a routerLink="login">登录</a>
                </li>
                <li routerLinkActive="active">
                    <a routerLink="register">注册</a>
                </li>
            </ul>
            <ul *ngIf="currentUser?.username" class="nav navbar-nav navbar-right">
                <li routerLinkActive="active">
                    <a routerLink="user">欢迎你：{{currentUser?.username}}</a>
                </li>
                <li routerLinkActive="active">
                    <a routerLink="manage">管理后台</a>
                </li>
                <li>
                    <a href="javascript:void(0);" (click)="doLogout()">退出</a>
                </li>
            </ul>
        </div>
    </div>
</div>
<!-- 主体内容区域 -->
<div class="main-container">
    <router-outlet></router-outlet>
</div>
<div class="footer bs-footer">
    <div class="container">
        <div class="row">
            <p>
                Powered by <a href="http://git.oschina.net/mumu-osc/NiceFish" target="_blank">NiceFish</a>
            </p>
            <p>
                湘ICP备12011607号
            </p>
        </div>
    </div>
</div>
